package org.bot.plugin.web.event;

import org.bot.api.event.DataStorage;
import org.bot.api.event.EventName;
import org.bot.api.event.Events;
import org.bot.api.flow.FlowNode;
import org.bot.plugin.web.util.WebApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@EventName("获取当前页面标识")
public class WebGetCurPageId implements Events {

    @Autowired
    WebApi webApi;

    @Override
    public Object exec(FlowNode node, DataStorage data) {
        return webApi.getCurPageId(webApi.getWebDriver(node));
    }
}
